﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using Projectmanagement.Utl;

namespace Projectmanagement.Entity
{
    public class ProjectType:EntityBase
    {
        public string Name{get;set;}
    }

     public class Area:EntityBase
    {
        public string Name{get;set;}
    }

     public class Member : EntityBase
     {
          [Display(Name = "名称")]
         public string Name { get; set; }
          public virtual RolePM RolePM { get; set; }
          public int? RolePMID { get; set; }
         public virtual Project Project { get; set; }
          [Display(Name = "项目")]
         public virtual int? ProjectID { get; set; }
          [Display(Name = "是否激活")]
         public virtual bool IsActivated { get; set; }
     }

     public class Project : EntityBase
     {
         public virtual List<Member> Members { get; set; }

         [Display(Name = "项目显示名"), Required]
         public string Name { get; set; }

         //唯一名称和唯一编号都是在项目报表统计使用的
         [Display(Name = "项目显示名"), Required]
         public string ProjectDisplayName { get; set; }

         [Display(Name = "项目类型")]
         public virtual ProjectType ProjectType { get; set; }
         [Display(Name = "项目类型")]
         public int? ProjectTypeID { get; set; }


         [Display(Name = "项目负责人")]
         public string Manager { get; set; }

         [Display(Name = "项目编号"), Required]
         public string ProjectCode { get; set; }

         [Display(Name = "市场部接口人")]
         public string Market { get; set; }

         [Display(Name = "会务部接口人")]
         public string Conference { get; set; }

         [Display(Name = "产品部接口人")]
         public string Product { get; set; }

         public virtual List<Task> Tasks { get; set; }
         //public virtual List<Member> Members { get; set; }

         [Display(Name = "正在进行"), Required]
         public bool IsActived { get; set; }

         [Display(Name = "项目开始时间"), Required, DisplayFormat(DataFormatString = "{0:d}")]
         public DateTime StartDate { get; set; }

         [Display(Name = "项目结束时间"), Required, DisplayFormat(DataFormatString = "{0:d}")]
         public DateTime EndDate { get; set; }

         [Display(Name = "会议开始时间"), Required, DisplayFormat(DataFormatString = "{0:d}")]
         public DateTime ConferenceStartDate { get; set; }

         [Display(Name = "会议结束时间"), Required, DisplayFormat(DataFormatString = "{0:d}")]
         public DateTime ConferenceEndDate { get; set; }

         [Display(Name = "销售目标"), Required, DisplayFormat(DataFormatString = "{0:c}")]
         public decimal Target { get; set; }

         [Display(Name = "销售经理")]
         public string TeamLeader { get; set; }

         [Display(Name = "会议地址")]
         public string Location { get; set; }

         [Display(Name = "其它")]
         public string Others { get; set; }

         public virtual Area Area { get; set; }
         [Display(Name = "默认行业"), Required]
         public int? AreaID { get; set; }

        
     }

    
       
  
}